package net.ericaro.neojavagen.types;

/**
 * <b>TypeBound</b> ::= "extends" <{@link net .ericaro .neojavagen .types .ClassOrInterfaceType ClassOrInterfaceType}> <
 * {@link net .ericaro .neojavagen .types .AdditionalBounds AdditionalBounds}>?
 * 
 * @author eric@ericaro.net
 */
public class TypeBound extends net.ericaro.neojavagen.JavaPartComposition {
	private net.ericaro.neojavagen.types.AdditionalBounds additionalBounds;

	private net.ericaro.neojavagen.types.ClassOrInterfaceType classOrInterfaceType;

	public TypeBound(net.ericaro.neojavagen.types.ClassOrInterfaceType classOrInterfaceType) {
		this.classOrInterfaceType = classOrInterfaceType;
		this.additionalBounds = null;
	}

	public TypeBound(net.ericaro.neojavagen.types.ClassOrInterfaceType classOrInterfaceType, net.ericaro.neojavagen.types.AdditionalBounds additionalBounds) {
		super();
		this.classOrInterfaceType = classOrInterfaceType;
		this.additionalBounds = additionalBounds;
	}

	public net.ericaro.neojavagen.types.AdditionalBounds getAdditionalBounds() {
		return additionalBounds;
	}

	public net.ericaro.neojavagen.types.ClassOrInterfaceType getClassOrInterfaceType() {
		return classOrInterfaceType;
	}

	public void setAdditionalBounds(net.ericaro.neojavagen.types.AdditionalBounds additionalBounds) {
		this.additionalBounds = additionalBounds;
	}

	public void setClassOrInterfaceType(net.ericaro.neojavagen.types.ClassOrInterfaceType classOrInterfaceType) {
		this.classOrInterfaceType = classOrInterfaceType;
	}

	@Override
	public java.lang.String toString() {
		return print("extends", classOrInterfaceType, additionalBounds);
	}
}
